Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@types/through2
Advanced tools
TypeScript definitions for through2
npm install --save @types/through2
This package contains type definitions for through2 (https://github.com/rvagg/through2).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/through2.
/// <reference types="node" />
import stream = require("stream");
declare function through2(transform?: through2.TransformFunction, flush?: through2.FlushCallback): stream.Transform;
declare function through2(
opts?: stream.DuplexOptions,
transform?: through2.TransformFunction,
flush?: through2.FlushCallback,
): stream.Transform;
declare namespace through2 {
interface Through2Constructor extends stream.Transform {
new(opts?: stream.DuplexOptions): stream.Transform;
(opts?: stream.DuplexOptions): stream.Transform;
}
type TransformCallback = (err?: any, data?: any) => void;
type TransformFunction = (
this: stream.Transform,
chunk: any,
enc: BufferEncoding,
callback: TransformCallback,
) => void;
type FlushCallback = (this: stream.Transform, flushCallback: () => void) => void;
/**
* Convenvience method for creating object streams
*/
function obj(transform?: TransformFunction, flush?: FlushCallback): stream.Transform;
/**
* Creates a constructor for a custom Transform. This is useful when you
* want to use the same transform logic in multiple instances.
*/
function ctor(transform?: TransformFunction, flush?: FlushCallback): Through2Constructor;
function ctor(
opts?: stream.DuplexOptions,
transform?: TransformFunction,
flush?: FlushCallback,
): Through2Constructor;
}
export = through2;
These definitions were written by Bart van der Schoor, Georgios Valotasios, TeamworkGuy2, and Alorel.
FAQs
TypeScript definitions for through2
We found that @types/through2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.